#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "mythread.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    //创建启动等待线程
    myThread t1,t2;
    t1.run();
    t2.run();
    t1.wait();
    t2.wait();

    qDebug()<<myThread::num;
}

MainWindow::~MainWindow()
{
    delete ui;
}

